package com.inlycat.entity;

import java.io.Serializable;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.URL;

/**
 * @author jarvan4dev@163.com
 * @since 2015年8月12日上午11:24:45 用户信息实体类
 */

//json转换的时候，用于过滤null字段
//@JsonInclude(Include.NON_NULL)
public class UserInfo implements Serializable {

	private static final long serialVersionUID = 1399275968143327593L;

	private long id;

	/**
	 * 用户ID
	 */
	private long userId;

	@Length(max = 10, message = "{userinfo.nickname.length}")
	private String nickname;

	@URL(message = "{userinfo.photo.url}")
	private String photo;

	private Boolean gender;
	private Integer age;
	private String city;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getPhoto() {
		return photo;
	}

	public void setPhoto(String photo) {
		this.photo = photo;
	}

	public Boolean getGender() {
		return gender;
	}

	public void setGender(Boolean gender) {
		this.gender = gender;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Override
	public String toString() {
		return "UserInfo [id=" + id + ", userId=" + userId + ", nickname="
				+ nickname + ", photo=" + photo + ", gender=" + gender
				+ ", age=" + age + ", city=" + city + "]";
	}

}
